pp108 : Generating Custom Web Service Operations on Database Details

Generating Custom Web Service Operations on Database Details

This topic describes the procedure to generate custom Web service operations for the tables and/or views in the database.

Before you begin this task:

  • WS-AppServer service must be configured and should be available as the metadata service.
  • Database Metadata is created on the metadata service


Using this option, you can generate custom Web service operations using a combination of tables, views and using a query that is built by a query builder. The advantage of this feature is that you can conveniently create a Web service that is much more closer to your business requirements, without depending upon any external tool.

  1. In Workspace Documents (Explorer), open <solution> > <project> > <database metadata>. The Database Metadata expands and displays its contents.
  2. Under Database Metadata, expand either Tables or Views, right-click a specific table or view, and select Generate Custom Web Service Operation. The DB Table window appears, displaying the selected table/view and its fields, all the expressions required to build the query, and options to check and validate the query.
  3. Right-click the table/view from the Tables/Views list and select a relevant option:
    • View all Relations to add all the related tables of the selected table to the Views/Tables list.
    • Choose Tables to add new tables to the Views/Tables list for generating the query
    • Choose Views to add new views to the Views/Tables list for generating the query.
  4. Build the query using information available in the Fields and Expressions boxes.
    Note: Select the field which need to be added in the selectArea. Select the area where the field has to be added and click Add button. If the area is not selected, double click the field at the end of the content in the select Area.Go through the following references that will help you to build the query:
    • You may create a Composite Query by selecting more data from than one table. To do this, select the Composite Query check box. Refer to Types of Queries for information on the types of queries which can be generated.
    • You will see several tags (in red) that need to be replaced with proper values and operators. For information on replacing the tags in the conditional detail of a query, see Replacing Tags in a Query.
  5. Click Validate, Check Query, and View to ensure that the query is accurate and complete in all respects. The results appear in different dialog boxes.
  6. Click Generate Custom Web Service Operations. The Web Service Interface Generator dialog box appears.
  7. Provide details such as the Name and Description of the Web service operation, the Name of the Web service interface, the location to save the Web service operation, and click Generate.
    The Web service along with the Web service interface and Web service operation(s) is generated and placed at the selected location.

After you complete this task:
You must publish the generated Web service operations to the organization and attach the Web service interface to the WS-AppServer Service before you can use them at runtime.
Note:

  • To edit the generated Web service operation, right-click it and select Edit Web Service Operation. The Web Service Operation <table name> - Binding Operation window appears. Modify the details and click Update Web service Operation to regenerate it.
  • To edit the implementation of the generated Web service operation, double-click the <Web service operation> and open the Binding Operation Properties window. For example, change the value for 'type', or rename the 'parameter', and so on. However, ensure that whatever you are modifying is functionally correct and valid. Otherwise, the changes may cause the Web service operation to fail. For details on method implementation, see topic Leveraging XQY Extensions in WS-AppServer.

Related tasks

Generating Standard Web Service Operations on a Database
Generating Web Service Operations on a Database Metadata
Generating Web Service Operations on a WS-AppServer Package
Generating Web Service Operations on Custom Logic
Generating Web Service Operations on Java Classes
Updating Web Services
Testing Web Service Operations
Viewing the WSDL of a Web Service Operation

Related reference

Exploring Web Service and its Child Entities